﻿function CreateArticleHtml(objArticleResultInfo) {
    var html = "";
    if (typeof (objArticleResultInfo) == "undefined") {
        return html;
    }
    var typehtml = "";
    var objArticleInfo = null;
    if (typeof (objArticleResultInfo.ArticleCollect) != "undefined") {
        objArticleInfo = objArticleResultInfo.ArticleCollect;
    }
    if (typeof (objArticleResultInfo.ArticleInfo) != "undefined") {
        objArticleInfo = objArticleResultInfo.ArticleInfo;
    }
    var articleTypes = objArticleInfo.ArticleType.split(',');
    if (articleTypes.indexOf("1") >= 0) {
        typehtml = '<em class="tag-total">图集</em>';
    }
    else if (articleTypes.indexOf("2") >= 0) {
        typehtml = '<i class="icon-play"></i>';
    }
    html =
        '<li>' +
            '<a href="' + objArticleResultInfo.TargetUrl + '" class="m-lk">' +
            '<span class="img-show">' +
                    '<img onload="javascript:TOUCH.util.resizeImage(this,80,60)" src="' + objArticleInfo.MinPic + '" alt="' + objArticleInfo.ArticleTitle + '" width="80" height="60">' + typehtml +
                '</span>' +
                '<div class="detail">' +
                    '<h3>' + objArticleInfo.ArticleTitle + '</h3>' +
                    '<div class="u-txt">' +
                        '<time>' + JsonToDate(objArticleInfo.PublishDate, false) + '</time>' +
                        '<span class="resource">' + objArticleInfo.ArticleAuthor + '</span>' +
                    '</div>' +
                '</div>' +
            '</a>' +
        '</li>';
    return html;
}

function CreateCommentHtml(objCommentInfo) {
    var html = "";
    if (objCommentInfo == null) {
        return html;
    }
    html =
        '<li>' +
            '<a class="comment-list-title2">' +
                '<strong class="comment-user-name">' +
                    '<span class="t_ucc_link" uid="656429962">我是熊宝宝</span>' +
                '</strong>' +
                '<time class="">18秒前</time>' +
            '</a>' +
            '<div class="comment-content2">' +
                '一种最广大劳动人民喝不起，只有官员才喝的起的酒也能称国酒？改名叫官酒才更恰当！多喝点喝死你们这帮龟孙！' +
            '</div>' +
        '</li>';
    return html;
}